{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9252d5a5-8af1-4f99-b799-ee044329fb23",
   "metadata": {
    "tags": [
     "hide"
    ]
   },
   "outputs": [],
   "source": [
    "import seaborn.objects as so"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "406f8f8d-b590-46f4-a230-626e32e52c71",
   "metadata": {},
   "source": [
    "Control the overall dimensions of the figure with `size`:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "fefc2b45-3510-4cd7-9de9-4806d71fc4c1",
   "metadata": {},
   "outputs": [],
   "source": [
    "p = so.Plot().layout(size=(4, 4))\n",
    "p"
   ]
  },
  {
   "cell_type": "raw",
   "id": "909a47bb-82f5-455a-99c3-7049d548561b",
   "metadata": {},
   "source": [
    "Subplots created by using :meth:`Plot.facet` or :meth:`Plot.pair` will shrink to fit in the available space:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3163687c-8d48-4e88-8dc2-35e16341e30e",
   "metadata": {},
   "outputs": [],
   "source": [
    "p.facet([\"A\", \"B\"], [\"X\", \"Y\"])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "feda7c3a-3862-48d4-bb18-419cd03fc081",
   "metadata": {},
   "source": [
    "You may find that different automatic layout engines give better or worse results with specific plots:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c2107939-c6a9-414c-b3a2-6f5d0dd60daf",
   "metadata": {},
   "outputs": [],
   "source": [
    "p.facet([\"A\", \"B\"], [\"X\", \"Y\"]).layout(engine=\"constrained\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "781ff58c-b805-4e93-8cae-be0442e273ea",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "py310",
   "language": "python",
   "name": "py310"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
